package chapter03;

import java.util.Arrays;

public class ArrayMethods {
    public static void main(String[] args) {
        int[] arr1 = {1,2,3,4};
        int[] arr2 = {1,2,3,4};
        int[] arr3 = {1,3,2,4};

        System.out.println(Arrays.equals(arr1, arr2));
        System.out.println(Arrays.equals(arr1, arr3));

        Arrays.fill(arr2, 10);
        System.out.println(Arrays.toString(arr2));

        Arrays.sort(arr3);
        System.out.println(Arrays.toString(arr3));

        int index = Arrays.binarySearch(arr3, 4);
        System.out.println(index);
    }
}
